

****************************************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************************************
****************************************************************************************    ECONOMIC ANALYSIS  *************************************************************************************************
****************************************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************************************

     
clear
use "Brancati_isoqtrly_final.dta" 

xtset isonum
gen lnrealGDP = ln(realGDP)
gen lnrealGDP_lag = ln(realGDP_lag)   
*Note: exit and entrance are not included in the baseline controls: Exit: no observations: Entrance: one country Ukraine, equivalent to FE for Ukraine. 


******************************************************************************************************************************************************************************************************************
******************************************************************************************************************************************************************************************************************
******************************************************************************************************************************************************************************************************************
************************************* Economic Factors: Outcome Variables *****************************************************************************************************************************************
******************************************************************************************************************************************************************************************************************

*TABLE 14: Economic Outcome Models (OLS, FE)*

*Model 1* 
xtreg lnrealGDP oxfstringindex_qtrlag deaths_wklag, fe 
 
*Model 2 (text Model 3,  Figure 3)* 
xtreg lnrealGDP lockdownoxf50_qtrlag postlockdownoxf50nolast_qtrlag postlastlockdownoxf50_qtrlag deaths_wklag, fe 
   margins, at(lockdownoxf50_qtrlag=0 postlockdownoxf50nolast_qtrlag=0 postlastlockdownoxf50_qtrlag=0)
   margins, at(lockdownoxf50_qtrlag=1 postlockdownoxf50nolast_qtrlag=0 postlastlockdownoxf50_qtrlag=0)
   margins, at(lockdownoxf50_qtrlag=0 postlockdownoxf50nolast_qtrlag=0 postlastlockdownoxf50_qtrlag=1)
test lockdownoxf50_qtrlag=postlastlockdownoxf50_qtrlag
  
*Model 3* 
xtreg unemploy oxfstringindex_qtrlag deaths_wklag, fe 
 
*Model 4* Figure 3, Model 4 (previously Figure 5, Model 7)*
xtreg unemploy postlastlockdownoxf50_qtrlag postlockdownoxf50nolast_qtrlag lockdownoxf50_qtrlag deaths_wklag, fe 
   margins, at(lockdownoxf50_qtrlag=0 postlockdownoxf50nolast_qtrlag=0 postlastlockdownoxf50_qtrlag=0)
   margins, at(lockdownoxf50_qtrlag=1 postlockdownoxf50nolast_qtrlag=0 postlastlockdownoxf50_qtrlag=0)
   margins, at(lockdownoxf50_qtrlag=0 postlockdownoxf50nolast_qtrlag=0 postlastlockdownoxf50_qtrlag=1)
test lockdownoxf50_qtrlag=postlastlockdownoxf50_qtrlag   
  
 
****************************************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************************************
*********************************************************************** LOCKDOWN ECONOMIC MODELS: POISSON CONDITIONAL FE  **************************************************************************************
****************************************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************************************
 
*TABLE 15:  Economic Predictor Models (Poisson, FE) **
    
*Model 1 (text Model 5, Figure 4)*
xtpoisson rebelattk_isodly stateattk_isowkly_lag deaths_wklag lnrealGDP_lag, fe 

*Model 2
xtpoisson rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag lnrealGDP_lag, fe 

*Model 3 (text Model 6, Figure 4)*   
xtpoisson rebelattk_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag lnrealGDP_lag, fe 
test lockdown_oxf50=postlastlockdown_oxf50
 
*Model 4 (text Model 7, Figure 4)*
xtpoisson rebelattk_isodly stateattk_isowkly_lag deaths_wklag unemploy_lag, fe 

*Model 5
xtpoisson rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag unemploy_lag, fe 

*Model 6 (text Figure 4, Model 8)*
xtpoisson rebelattk_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag unemploy_lag, fe
test lockdown_oxf50=postlastlockdown_oxf50
 
*Model 7* 
xtpoisson rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag lnrealGDP_lag unemploy_lag, fe 
 

**TABLE 16: Economic Predictor Models-Time (Poisson, FE) (month) **

*Model 1*
xtpoisson rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag lnrealGDP_lag monthno, fe 
 
*Model 2*
xtpoisson rebelattk_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag lnrealGDP_lag monthno, fe 
test lockdown_oxf50=postlastlockdown_oxf50
 
*Model 3* 
xtpoisson rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag unemploy_lag monthno, fe
 
*Model 4*
xtpoisson rebelattk_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag unemploy_lag monthno, fe
test lockdown_oxf50=postlastlockdown_oxf50

*Model 5*
xtpoisson rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag lnrealGDP_lag unemploy_lag monthno, fe
 
*Model 6*  
xtpoisson rebelattk_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag lnrealGDP_lag unemploy_lag monthno, fe
test lockdown_oxf50=postlastlockdown_oxf50
 
 
**TABLE 17: Economic Predictor Models-Time (Poisson, FE) (year) ***

*Model 1*
xtpoisson rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag lnrealGDP_lag year, fe 

*Model 2* 
xtpoisson rebelattk_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag lnrealGDP_lag year, fe 
test lockdown_oxf50=postlastlockdown_oxf50
 
*Model 3*
xtpoisson rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag unemploy_lag year, fe

*Model 4*
xtpoisson rebelattk_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag unemploy_lag year, fe
test lockdown_oxf50=postlastlockdown_oxf50

*Model 5* 
xtpoisson rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag lnrealGDP_lag unemploy_lag year, fe

*Model 6* 
xtpoisson rebelattk_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag lnrealGDP_lag unemploy_lag year, fe
test lockdown_oxf50=postlastlockdown_oxf50
 
 
**** TABLE 18: Economic Predictor Models: Outcome: Civilian Attacks (Poisson, FE) ** 

*Model 1* 
xtpoisson rebelattkcivln_isodly stateattk_isowkly_lag deaths_wklag lnrealGDP_lag, fe 

*Model 2* 
xtpoisson rebelattkcivln_isodly oxfstringindex  stateattk_isowkly_lag deaths_wklag lnrealGDP_lag, fe 

*Model 3* 
xtpoisson rebelattkcivln_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag lnrealGDP_lag, fe
test lockdown_oxf50=postlastlockdown_oxf50 
test lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 
 
*Model 4* 
xtpoisson rebelattkcivln_isodly stateattk_isowkly_lag deaths_wklag unemploy_lag, fe  

*Model 5* 
xtpoisson rebelattkcivln_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag unemploy_lag, fe 

*Model 6* 
xtpoisson rebelattkcivln_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag unemploy_lag, fe 
test lockdown_oxf50=postlastlockdown_oxf50 
test lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 

****************************************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************************************
*********************************************************************** LOCKDOWN ECONOMIC MODELS: PPML  ********************************************************************************************************
****************************************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************************************
 
**** TABLE 19: Economic Models (PPML, Clustered SE) ****

egen isoyearqtr = concat(iso yearqtr) if yearqtr != ""

*Model 1* 
ppmlhdfe rebelattk_isodly stateattk_isowkly_lag deaths_wklag lnrealGDP_lag, absorb(isonum) vce(cluster isoyearqtr)

*Model 2* 
ppmlhdfe rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag lnrealGDP_lag, absorb(isonum) vce(cluster isoyearqtr)

*Model 3* 
ppmlhdfe rebelattk_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50  stateattk_isowkly_lag deaths_wklag lnrealGDP_lag, absorb(isonum) vce(cluster isoyearqtr)
test lockdown_oxf50=postlastlockdown_oxf50  
test lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 

*Model 4* 
ppmlhdfe rebelattk_isodly stateattk_isowkly_lag deaths_wklag unemploy_lag, absorb(isonum) vce(cluster isoyearqtr)

*Model 5* 
ppmlhdfe rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag unemploy_lag, absorb(isonum) vce(cluster isoyearqtr)
 
*Model 6* 
ppmlhdfe rebelattk_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag unemploy_lag, absorb(isonum) vce(cluster isoyearqtr)
test lockdown_oxf50=postlastlockdown_oxf50 
test lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 
 
*Model 7* 
ppmlhdfe rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag lnrealGDP_lag unemploy_lag, absorb(isonum) vce(cluster isoyearqtr)


****************************************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************************************
*********************************************************************** LOCKDOWN ECONOMIC MODELS: ZIP MODELS  **************************************************************************************************
****************************************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************************************
 
**** TABLE 20: Economic Models (ZIP)****
 
egen isoyearqtr = concat(iso yearqtr) if yearqtr != ""

*Model 1* 
zip rebelattk_isodly stateattk_isowkly_lag deaths_wklag lnrealGDP_lag, inflate(v2x_polyarchy_lag) vce(cluster isoyearqtr)
 
*Model 2* 
zip rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag lnrealGDP_lag, inflate(v2x_polyarchy_lag) vce(cluster isoyearqtr)

*Model 3* 
zip rebelattk_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag lnrealGDP_lag, inflate(v2x_polyarchy_lag) vce(cluster isoyearqtr)
test lockdown_oxf50=postlastlockdown_oxf50  
test lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 

*Model 4* 
zip rebelattk_isodly stateattk_isowkly_lag deaths_wklag unemploy_lag, inflate(v2x_polyarchy_lag) vce(cluster isoyearqtr)
 
*Model 5* 
zip rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag unemploy_lag, inflate(v2x_polyarchy_lag) vce(cluster isoyearqtr)

*Model 6* 
zip rebelattk_isodly lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 stateattk_isowkly_lag deaths_wklag unemploy_lag, inflate(v2x_polyarchy_lag) vce(cluster isoyearqtr)
test lockdown_oxf50=postlastlockdown_oxf50 
test lockdown_oxf50 postlockdown_oxf50nolast postlastlockdown_oxf50 
 
*Model 7* 
zip rebelattk_isodly oxfstringindex stateattk_isowkly_lag deaths_wklag lnrealGDP_lag unemploy_lag, inflate(v2x_polyarchy_lag) vce(cluster isoyearqtr)
 
 
